package biz.ezcom.design.pattern.state;

/**
 *　早上上班时的状态 
 */
public class StateMorning implements State {

	@Override
	public void handle(Context context) {
		int hour = context.getHour();
		if(hour > 8 && hour <= 12){
			System.out.println(hour + "：精神百倍");
		}else{
			context.setState(new StateAfternoon());
			context.request();
		}
	}
	

}
